package edu.gdkm.dao;

import edu.gdkm.pojo.Classinfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ClassinfoXml {
    @Select("select * from tb_class where id=#{id}")
    public Classinfo findById(Integer id);
    @Select("select * from tb_class")
    public List<Classinfo> findAll();
    @Select("select * from tb_class where classname=#{classname}")
    public Classinfo findByClassname(String classname);
    @Insert("insert into tb_class(classname) values(#{classname})")
    public boolean save(Classinfo classinfo);
    @Update("update tb_class set classname= #{classname} where id= #{id}")
    public boolean update(Classinfo classinfo);
}
